package com.song.cloud.payment.dao;

import com.song.cloud.common.entities.CommonResult;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author ZhangGuisong
 * @Date 2021/3/2-19:07
 */
@Component
public class paymentDao {
    private static Map<Integer, CommonResult> hashMap = new HashMap<>();
    private Integer id;

    static {
        hashMap.put(1, new CommonResult(101, "this is first message 9004", "good message"));
        hashMap.put(2, new CommonResult(102, "this is sencond message 9004", "better message"));
        hashMap.put(3, new CommonResult(103, "this is third message 9004", "best message"));
    }
    public  CommonResult getData(Integer id){
       return hashMap.get(id);
    }
}

